from laplace import *

def bb(x):
  if x < 0.48:
    return q(x / 0.48)
  elif x > 0.52:
    return q((x - 0.52) / 0.48)
  else:
    return 0

bb_boundary = build_boundary(bb, zero_fn, zero_fn, zero_fn)

N = 3
u = solve(laplace_central_diff_approx, quad_on_two_sides, zero_fn, N)

print u

# plot2 = false
# plot3 = true
# if plot2:
#   from matplotlib import pyplot
#   pyplot.contour(u)
#   pyplot.show()
# if plot3:
#from enthought.mayavi import mlab
#s = mlab.surf(u)
